package net.lzzy.practices.entities;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import javax.persistence.Entity;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import java.util.ArrayList;
import java.util.List;

/**
 * @author m
 */
@Entity
@Setter
@Getter
@Table(name = "options")
@NoArgsConstructor
public class Option extends BaseEntity{
    private String content;
    private  String label;
    private  boolean answer;
    @ManyToOne
    //多对一
   private Question question;
    @ManyToMany(mappedBy = "options")
    private List<Result> results = new ArrayList<>();


}
